home *** CD-ROM | disk | FTP | other *** search
-
- /***********************************************************************/
-
- /* File KDATA.C - RML Kermit - Global data.
- Chris Kennington, 8th July 1985. */
-
- #define DEFS1 1
- #define DEFS4 1
-
- /* definition of divisor-ruler */
- #define DL 0x18
- #define D 0x1f
- #define DR 0x17
-
- #include "stdio.h"
- #include "b:kext.h"
-
-
- /* Original Global Variables */
-
- int size,
- rpsiz = MAXPACKSIZ,
- spsiz = MAXPACKSIZ,
- pad=0,
- n=0,
- numtry,
- oldtry,
- image=FALSE,
- debug,
- filecount;
-
- char state,
- padchar=NULL,
- eol=CR,
- quote='#',
- **filelist,
- *filnam,
- *recpkt, *packet, *oldpkt; /* dynamic storage */
- FILE *fp;
-
-
- struct fcb *ownfcb;
- int badcrcs=0, dupes=0, naxin=0, timouts=0; /* error counters */
- int rptflg; /* repeat-processing agreed */
- int commode=0x0001; /* comms facilities-word */
- int echo=0, list=1, oldimage=0, parity=0;
- char comctrl=0xea; /* comms WR5 setting */
- char env; /* environment */
- char esccode, pager=0, scrline=0, spdcode=1;
- char files=1; /* current-file number */
- char kmode, abtflag, nakflag; /* Kermit mode; abort & nak flags */
- char nmavoid=1; /* File collision avoidance */
- char netslow=0, type=0; /* Network-slow flag, block-type */
- char softeof;
- char *cmdline, *osline, *ermsg, *fname, *work, *cmdparm[10], *filblank; /* dynamic */
-
- char blanx[] =" ";
- char badmsg[] ="Remote Kermit sent wrong packet; \"%c\" expected, \"%c\" received. ";
- char dots[] =" ... ";
- char errmsg[] ="Transfer aborted by human intervention. ";
- char forhelp[] =" Type \"?\" for help";
- char kqhelp[] = " \"H\" for help-message, \"K\" for main menu, \"Q\" to cancel Kermit.";
- char mainsays[]="Mainframe says: ";
- char null[] =""; /* empty string */
- char oprompt[] ="\rDISK> ";
- char *parsets[]={"None", "Odd", "Even", "Mark", 0};
- char trying[] ="trying... ";
- char divisor[] ={DL,D,D,D,D,D,D,D,D,D, D,D,D,D,D,D,D,D,D,D,
- D,D,D,D,D,D,D,D,D,D, D,D,D,D,D,D,D,D,D,D,
- D,D,D,D,D,D,D,D,D,D, D,D,D,D,D,D,D,D,D,D,
- D,D,D,D,D,D,D,D,D,D, D,D,D,D,D,D,D,D,D,DR};
-
- /* line-speed codes in clear */
- char sp0[]="110", sp1[]="300", sp2[]="600",
- sp3[]="1200", sp4[]="2400", sp5[]="4800",
- sp6[]="9600", sp7[]="19200",sp8[]="40800";
- char *spval[]={sp0,sp1,sp2,sp3,sp4,sp5,sp6,sp7,sp8};
-
- char head2[]=" Initial Release, Local Kermit Only, Communications: ";
- char head3[]=" Copyright (c) 1985 U.of Columbia, N.Y. & Research Machines.";
- char head4[]=" Mode: Speed: baud; ? for Help; <F4>K to Escape.";
- char head5[]=" File: Packets: type in: type out: ";
- char head6[]=" Transmission Errors:";
-
- char interr[]=" INTERNAL ERROR - ";
- char canx[] =" - transfer cancelled. ";
-
-
- /* Globals for comms handlers:- */
-
- char *locations[]={"by 480Z SIO4", "via Disk Unit", "by RS232C port",
- "by Aux (RS422)", "by Piconet SIM",
- "via Network","non-standard",0};
- int fuzz[] ={20000, 8000, 5000, 14000, 15000, 4000, 5000, 0}; /* timeouts */
-
-
- /* Mode structures:- */
- char connto[] ="Connect to Mainframe";
- char inform[] =" Input must be in format expected by mainframe.";
- char rcvng[] ="Receiving Files ";
- char sendf[] ="Sending Files ";
- char sendf1[] =" Sends up to 8 files to the mainframe. The file-names are prompted for, and";
- char sendf2[] ="are separated by blanks. Wildcards (* ?) may be used.";
-
- struct mode modker = {KERM,"Kermit Command ",0};
-
- struct mode modparm = {PARM,"Set/Show Parameters ",
- " Enters the menu for displaying and changing local Kermit parameters.",0};
-
- struct mode modconn = {CONN,connto,
- " Connects you to the mainframe host as a terminal. To get back to the micro,",
- "after starting the mainframe Kermit, hit \"F4\" then K.",0};
-
- struct mode modsend = {SEND,sendf,sendf1,sendf2,0};
-
- struct mode modrec = {RECV,rcvng,
- " Receives any number of files from the mainframe, converting names if needed.",
- "You will be prompted for replacement disk letter / names; otherwise they will",
- "be stored on the logged-in disk under their own names.",0};
-
- struct mode modcmd = {CMND,"Commands to Server",
- " Sends commands to a mainframe server-Kermit. Hit RETURN to see menu.",0};
-
- struct mode modisk = {DISK,"Disk Maintenance ",
- " Permits manipulation of files on the local or network disks without breaking",
- "any call to the mainframe. Commands available are:-",null,diskcmds,0};
-
- /* 01234567890123456789 each 20 chars */
- struct mode modquit = {QUIT,"Terminate Kermit Run",
- " Cancels RML Kermit and returns to Operating System.",0};
-
-
- struct mode *kmodes[] = {
- &modker, &modparm, &modconn, &modsend,
- &modrec, &modcmd, &rclogo, &modisk,
- &modquit, 0};
-
-
- /* remote-server command structures:- */
-
- struct mode rcget = {GET,"Get Files",
- " Instruct mainframe Kermit to send file(s);",
- inform,0};
-
- struct mode rcrmsv = {RMSV,"Kermit Commands",
- " Ask mainframe Kermit to interpret message as though in CONNECT mode;",
- inform,0};
-
- struct mode rcrmh = {RMH,"Mainframe OS Commands",
- " Ask mainframe Kermit to treat message as Operating System command;",
- inform,0};
-
- struct mode rcbye = {BYE,"Logout from Mainframe",
- " Send \"BYE\" to mainframe Kermit and disconnect.",0};
-
- /* sorry about misuse of names! */
- struct mode rclogo = {LOGO,"Cancel Other Kermit",
- " Kill mainframe Kermit & leave you connected to mainframe OS.",0};
-
- struct mode rcmain = {MAIN,"Back to Main Menu",0};
-
- struct mode *rcmds[] ={&modker,
- &rcrmsv, &rcrmh, &rcget, &modsend,
- &rclogo, &rcbye, &rcmain, &modquit, 0};
-
-
- /**************** END of file KDATA.C ***********************/
-
-